package com.clotingshoppos.modules.Shiro.controller;

import com.clotingshoppos.common.util.RetResponse;
import com.clotingshoppos.common.util.RetResult;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: AdminControlller
 * @Description: 管理员
 * @Author: Izzat
 * @Date: 2019-04-14 21:49
 * @Version: v1.0
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @RequestMapping(value = "/getMessage", method = RequestMethod.GET)
    @RequiresRoles("admin")
    public RetResult getMessage() {
        return new RetResponse().makeOKRsp().setMsg("您拥有管理员权限，可以获得该接口的信息！");
    }
}